package com.tjsinfo.tjsoa.system.bo;

import java.util.List;

import org.hibernate.criterion.DetachedCriteria;
import org.hibernate.criterion.Restrictions;

import com.tjsinfo.tjsoa.Dao.IQbcDao;
import com.tjsinfo.tjsoa.system.vo.TSystemYinzhang;

public class SystemYiZhangBO implements ISystemYiZhangBO{
	private IQbcDao qbcDao;
	
	
	public IQbcDao getQbcDao() {
		return qbcDao;
	}


	public void setQbcDao(IQbcDao qbcDao) {
		this.qbcDao = qbcDao;
	}


	/**
	 * 根据部门ID查询印章
	 * @param departmentId 部门ID
	 * @return 印章集合
	 */
	public List<TSystemYinzhang> selectYinZhangByDepartmentId(String departmentId){
		DetachedCriteria criteria = DetachedCriteria.forClass(TSystemYinzhang.class)
		.add(Restrictions.eq("TSystemDepartment.id", departmentId));
		return  qbcDao.getCriteria(criteria);
	}
}
